package com.example.demo.sub.service;

import com.example.demo.sub.RedisMsg;
import com.example.demo.sub.RedisStop;

/**
 * @Auther Created by l.wang on 2019/1/18.
 */
public class RedisPmpSub implements RedisMsg {
    private final RedisStop redisStop;

    public RedisPmpSub(RedisStop redisStop) {
        this.redisStop = redisStop;
    }

    /**
     * @param message 任务唯一key
     */
    public void receiveMessage(String message) {
        redisStop.stop(message);
    }
}
